﻿@model Eoffice.Models.NV

@{
    ViewBag.Title = "THÊM NHÂN VIÊN";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}

<h1>@ViewBag.Title</h1>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    
    <table class="TableUpdate" border="1">
        <tr>
            <td class="Control" colspan="2">
                <ul>
                    <li>
                        <input type="submit" value="Ghi lại" class="uupdate" />
                    </li>
                    <li>@Html.ActionLink("Trở về", "Index", "", new { @class = "uback" })</li>
                </ul>
            </td>
        </tr>
        <tr>
            <th>@Html.Label("MÃ SỐ NHÂN VIÊN")</th>
            <td>
                @Html.TextBoxFor(model => model.MSNV, new { @class = "text" })
                @Html.ValidationMessageFor(model => model.MSNV)
            </td>
        </tr>

        <tr>
            <th>@Html.Label("HỌ TÊN NHÂN VIÊN")</th>
            <td>
                @Html.TextBoxFor(model => model.HOTENNV, new { @class = "text" })
                @Html.ValidationMessageFor(model => model.HOTENNV)
            </td>
        </tr>

        <tr>
            <th>@Html.Label("TÊN ĐĂNG NHẬP")</th>
            <td>
                @Html.TextBoxFor(model => model.Username, new { @class = "text" })
                @Html.ValidationMessageFor(model => model.Username)
            </td>
        </tr>

        <tr>
            <th>@Html.Label("MẬT KHẨU")</th>
            <td>
                @Html.TextBoxFor(model => model.Password, "", new { @class = "text" })
                @Html.ValidationMessageFor(model => model.Password)
            </td>
        </tr>
        <tr>
            <th>@Html.Label("QUYỀN")</th>
            <td>
                @Html.TextBoxFor(model => model.Quyen, "", new { @class = "text" })
                @Html.ValidationMessageFor(model => model.Quyen)
                <span style="color:red">(</span><span style="color:blue">Quản trị-1, Lãnh đạo-2, Chuyên viên-3, Văn thư-4</span><span style="color:red">)</span>
            </td>
        </tr>
        <tr>
            <th>@Html.Label("NGÀY SINH")</th>
            <td>
                @Html.TextBoxFor(m => m.NGAYSINH, new { @class = "text" })
                @Html.ValidationMessageFor(m => m.NGAYSINH)
            </td>

        </tr>

        <tr>
            <th>@Html.Label("ĐỊA CHỈ")</th>
            <td>
                @Html.TextAreaFor(m => m.DCNV, new { @class = "trichyeu" })
                @Html.ValidationMessageFor(m => m.DCNV)
            </td>
        </tr>

        <tr>
            <th>@Html.Label("ĐIỆN THOẠI")</th>
            <td>
                @Html.TextBoxFor(model => model.DTNV, new { @class = "text" })
                @Html.ValidationMessageFor(model => model.DTNV)
            </td>
        </tr>

        <tr>
            <th>@Html.Label("PHÒNG BAN")</th>
            <td>
                @Html.DropDownList("MAPB", String.Empty)
                @Html.ValidationMessageFor(model => model.MAPB)
            </td>
        </tr>

        @*<tr>
                <th>@Html.Label("CHỨC DANH")</th>
                <td>
                    @Html.TextBoxFor(model => model.CHUCDANH, new { @class = "text" })
                    @Html.ValidationMessageFor(model => model.CHUCDANH)
                </td>
            </tr>

            <tr>
                <th>@Html.Label("CHỨC VỤ")</th>
                <td>
                    @Html.TextBoxFor(model => model.CHUCVU, new { @class = "text" })
                    @Html.ValidationMessageFor(model => model.CHUCVU)
                </td>
            </tr>*@
        <tr>
            <td class="Control" colspan="2">
                <ul>
                    <li>
                        <input type="submit" value="Ghi lại" class="uupdate" />
                    </li>
                    <li>@Html.ActionLink("Trở về", "Index", "", new { @class = "uback" })</li>
                </ul>
            </td>
        </tr>

    </table>
}

@*<script type="text/javascript">
        var editor;
        function createEditor(languageCode, id) {
            var editor = CKEDITOR.replace(id, {
                language: languageCode
            });
        }

        $(function () {
            createEditor('vi', 'DCNV');

        });
    </script>*@

<script type="text/javascript">
    $(function () {
        $("#NGAYSINH").datepicker({
            dateFormat: 'dd/mm/yy',
            changeYear: true,
            changeMonth: true
        });
    });
</script>